package com.irdstudio.efp.esb.service.mock.hj;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.irdstudio.efp.esb.service.bo.req.hj.ReqProductLoanQueryBean;
import com.irdstudio.efp.esb.service.bo.resp.hj.RespProductLoanQueryBean;
import com.irdstudio.efp.esb.service.facade.hj.ProductLoanQueryService;

/**
 * 互金产品放款余额查询
 * 
 * @author liyakui
 * @since 2018年12月20日 下午6:04:40
 * @version 1.0
 */
@Service("productLoanQueryService")
public class ProductLoanQueryServiceImpl implements ProductLoanQueryService {
	Logger logger = LoggerFactory.getLogger(ProductLoanQueryServiceImpl.class);

	@Override
	public RespProductLoanQueryBean productLoanQuery(ReqProductLoanQueryBean reqProductLoanQueryBean) {
		logger.info("互金产品放款余额查询交易开始");
		// 返回对象
		RespProductLoanQueryBean respProductLoanQueryBean = new RespProductLoanQueryBean();
		try {
			// 1.调用ESB客户端服务
			// respProductLoanQueryBean =
			// ESBClientFactory.buildClient().withBody(reqProductLoanQueryBean).withTradeNo("")
			// .create().sendAndReceive().getBody(RespProductLoanQueryBean.class);
			respProductLoanQueryBean.setChannelProdAmt("100000");
			respProductLoanQueryBean.setChannelProdOutstanding("1000000");
			respProductLoanQueryBean.setProdType("互金");
			
		} catch (Exception e) {
			logger.info("产品放款余额接口调用失败！");
		}
		return respProductLoanQueryBean;
	}

}

